package com.hs.wa.test;

import com.hs.wa.vo.Person;

import java.util.ArrayList;
import java.util.List;

public class Copy2 {

    public static void main(String[] args) {

        List<Person> a = new ArrayList<>();
        Person s = new Person();
        s.setId(1);
        s.setName("Alice");
        s.setAge(20);
        s.setCourses("Arrays.asList(");
        a.add(s);

        Person s2 = new Person();
        s2.setId(12);
        s2.setName("Alice2");
        s2.setAge(202);
        s2.setCourses("Arrays.asList(");
        a.add(s2);

        Person s3 = new Person();
        s3.setId(13);
        s3.setName("Alice3");
        s3.setAge(203);
        s3.setCourses("Arrays.asList(33");
        a.add(s3);


        for (int i = 0; i < a.size(); i++) {
            a.get(i).setAge(a.get(i).getAge() + 9000000);
            System.out.println(a.get(i));
        }

        System.out.println(a);
    }


}
